package gameObject;

import java.awt.Point;

public class Bullet extends MovableObject 
{
	public static final int MAX_BULLETS = 50;
	public static int BULLET_VELOCITY = 5;
	private static final int LIFETIME = 100; 
	private static final int LIFE_DECREMENT = 10;
	private int _lifetime;
	
	public Bullet() 
	{
		super();
		_lifetime = LIFETIME;
	}

	
	public void activate(Point shipPosition, int shipAngle)
	{
		super.activate(shipPosition, shipAngle);
		_lifetime = LIFETIME;
	}
	
	//consolidate / make new method name...chat about this one
	public boolean updatePositionAndReturnAliveStatus()
	{
		moveBullet();
		decreaseLifetime();
		return (_lifetime > 0);
	}
	
	private void moveBullet()
	{
		super.moveGameObject(BULLET_VELOCITY);
	}
	
	private void decreaseLifetime()
	{
		_lifetime -= LIFE_DECREMENT;
	}

	
	public void move()
	{
		// TODO Auto-generated method stub
		
	}
	

}
